package top.tagao.study66demo.threadTest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @author viktor
 * @date 2024/6/13
 */
@Controller
@RequestMapping(value="/demo")
public class BootTomcatController {

    @Resource
    private BootTomcatService bootTomcatService;

    @RequestMapping(value="/test/{count}")
    @ResponseBody
    public String test(@PathVariable(name = "count", required = true) int count) throws InterruptedException {
        bootTomcatService.testTomcatThread(count);
        return "hello world " + count;
    }


}
